<?php
header("Content-type: text/xml"); 
echo '<?xml version="1.0" ?>'."\n";
$a = array();
$d = array();

$f = scandir(".");
foreach($f as $i) {
	if ($i[0]!=".") {
		if (is_dir($i)) {
			$d[] = $i;
		} else {
			$p = pathinfo($i);
			if ($p["extension"]=="jad") {
				$a[] = $i;
			}
		}
	}
}
sort($a);
sort($d);

echo '<jads>';
foreach($a as $i) {
	echo '<jad>'.$url.'/'.$i.'</jad>';
}
echo '</jads>';
